import request from '@/utils/request'

// 获取仪表盘数据
export function getDashboardData() {
  return request({
    url: '/media/dashboard/data',
    method: 'get'
  })
}

// 刷新仪表盘数据
export function refreshDashboardData() {
  return request({
    url: '/media/dashboard/refresh',
    method: 'post'
  })
}

// 获取指定时间范围的数据
export function getDashboardDataByDateRange(startDate, endDate) {
  return request({
    url: '/media/dashboard/data/date-range',
    method: 'get',
    params: {
      startDate: startDate,
      endDate: endDate
    }
  })
}